/* 
 * File:   MathematicalFunctionsTest.cpp
 * Author: Cody TV Weber
 *
 * Created on Mar 27, 2014, 10:34:42 AM
 */

#include <stdlib.h>
#include <iostream>
#include "mathematicalFunctions.h"

/*
 * Simple C++ Test Suite
 */

void testAbsoluteValue() {
    int number = -5;
    int result = absoluteValue(number);
    std::cout << result << std::endl;
    if (result != 5) {
        std::cout << "%TEST_FAILED% time=0 testname=testAbsoluteValue (MathematicalFunctionsTest) message=error message sample" << std::endl;
    }
}

void testIterativeProduct() {
    double matrix[5] = {1.0, 1.5, 1.27, .054, 1024.0};
    int numberOfElements = 5;
    double result = iterativeProduct(matrix, numberOfElements);
    std::cout << result << std::endl;
    if (result == 0.0) {
        std::cout << "%TEST_FAILED% time=0 testname=testIterativeProduct (MathematicalFunctionsTest) message=error message sample" << std::endl;
    }
}

int main(int argc, char** argv) {
    std::cout << "%SUITE_STARTING% MathematicalFunctionsTest" << std::endl;
    std::cout << "%SUITE_STARTED%" << std::endl;

    std::cout << "%TEST_STARTED% testAbsoluteValue (MathematicalFunctionsTest)" << std::endl;
    testAbsoluteValue();
    std::cout << "%TEST_FINISHED% time=0 testAbsoluteValue (MathematicalFunctionsTest)" << std::endl;

    std::cout << "%TEST_STARTED% testIterativeProduct (MathematicalFunctionsTest)" << std::endl;
    testIterativeProduct();
    std::cout << "%TEST_FINISHED% time=0 testIterativeProduct (MathematicalFunctionsTest)" << std::endl;

    std::cout << "%SUITE_FINISHED% time=0" << std::endl;

    return (EXIT_SUCCESS);
}

